import { createRouter, createWebHistory } from 'vue-router'
import calculator from "@/views/Calculator.vue"

// 路由配置
const routes = [
  {
    path: '/',
    redirect: '/home' // 默认重定向到主页
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home.vue') // 你的主页面组件
  },
  {
    path: '/calculator',
    name: 'Calculator',
    component: calculator
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
